- Author:
- Soroush Safaei <ssaf006@aucklanduni.ac.nz>
- Date:
- 2017-10-08 22:56:35+13:00
- Desc:
- transferring files
- Permanent Source URI:
- https://models.fieldml.org/workspace/43b/rawfile/ea17eea2ce8af5936935d418bb84ef910325280f/BG Tutorial Mechanical Systems/Analytical Pendulum.cellml
<?xml version='1.0'?>
<model name="my_model" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#">
<!-- Multibody problem: Driven mass on rail with single pin jointed pendulum-->
<units name="m_per_s">
<unit units="metre"/>
<unit exponent="-1" units="second"/>
</units>
<units name="m_per_s2">
<unit units="metre"/>
<unit exponent="-2" units="second"/>
</units>
<units name="rad_per_s">
<unit units="radian"/>
<unit exponent="-1" units="second"/>
</units>
<units name="rad_per_s2">
<unit units="radian"/>
<unit exponent="-2" units="second"/>
</units>
<units name="Js2_per_m2">
<unit units="joule"/>
<unit exponent="2" units="second"/>
<unit exponent="-2" units="metre"/>
</units>
<units name="J_per_m">
<unit units="joule"/>
<unit exponent="-1" units="metre"/>
</units>
<units name="Js2_per_rad">
<unit units="joule"/>
<unit exponent="2" units="second"/>
<unit exponent="-1" units="radian"/>
</units>
<component name="main">
<!-- Unknowns -->
<variable initial_value="0" name="t" units="second"/>
<variable initial_value="3.141592" name="PI" units="dimensionless"/>
<!--var theta: radian {init: 0.7854};-->
<variable initial_value="0.1" name="theta" units="radian"/>
<variable name="theta_deg" units="dimensionless"/>
<variable initial_value="0" name="omega" units="rad_per_s"/>
<variable name="omega_t" units="rad_per_s2"/>
<variable initial_value="9.81" name="g" units="m_per_s2"/>
<variable initial_value="1" name="l_B" units="metre"/>
<variable initial_value="1" name="J_B" units="Js2_per_rad"/>
<variable initial_value="1" name="m_A" units="Js2_per_m2"/>
<variable initial_value="1" name="m_B" units="Js2_per_m2"/>
<variable initial_value="0" name="F_A" units="J_per_m"/>
<variable name="u_A_1" units="J_per_m"/>
<variable name="u_A_2" units="J_per_m"/>
<variable initial_value="0" name="v_A_1" units="m_per_s"/>
<variable initial_value="0" name="v_B_1" units="m_per_s"/>
<variable initial_value="0" name="v_B_2" units="m_per_s"/>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>theta</ci>
</apply>
<ci>omega</ci>
</apply>
<apply>
<eq/>
<ci>theta_deg</ci>
<apply>
<divide/>
<apply>
<times/>
<ci>theta</ci>
<cn cellml:units="dimensionless">180</cn>
</apply>
<ci>PI</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>omega</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<apply>
<times/>
<apply>
<plus/>
<ci>m_A</ci>
<ci>m_B</ci>
</apply>
<apply>
<sin/>
<ci>theta</ci>
</apply>
<ci>g</ci>
</apply>
<apply>
<times/>
<apply>
<cos/>
<ci>theta</ci>
</apply>
<ci>F_A</ci>
</apply>
</apply>
<apply>
<times/>
<ci>l_B</ci>
<ci>m_B</ci>
<apply>
<sin/>
<ci>theta</ci>
</apply>
<apply>
<cos/>
<ci>theta</ci>
</apply>
<apply>
<power/>
<ci>omega</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
<apply>
<plus/>
<apply>
<divide/>
<apply>
<times/>
<apply>
<plus/>
<ci>m_A</ci>
<ci>m_B</ci>
</apply>
<ci>J_B</ci>
</apply>
<apply>
<times/>
<ci>l_B</ci>
<ci>m_B</ci>
</apply>
</apply>
<apply>
<times/>
<ci>l_B</ci>
<apply>
<plus/>
<ci>m_A</ci>
<apply>
<times/>
<ci>m_B</ci>
<apply>
<power/>
<apply>
<sin/>
<ci>theta</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>omega_t</ci>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>omega</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u_A_1</ci>
<apply>
<times/>
<apply>
<divide/>
<apply>
<times/>
<ci>m_A</ci>
<ci>m_B</ci>
</apply>
<apply>
<plus/>
<ci>m_A</ci>
<ci>m_B</ci>
</apply>
</apply>
<apply>
<minus/>
<apply>
<plus/>
<apply>
<divide/>
<ci>F_A</ci>
<ci>m_A</ci>
</apply>
<apply>
<times/>
<ci>l_B</ci>
<apply>
<cos/>
<ci>theta</ci>
</apply>
<ci>omega_t</ci>
</apply>
</apply>
<apply>
<times/>
<ci>l_B</ci>
<apply>
<sin/>
<ci>theta</ci>
</apply>
<apply>
<power/>
<ci>omega</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>u_A_2</ci>
<apply>
<times/>
<ci>m_B</ci>
<apply>
<minus/>
<apply>
<minus/>
<ci>g</ci>
<apply>
<times/>
<ci>l_B</ci>
<apply>
<sin/>
<ci>theta</ci>
</apply>
<ci>omega_t</ci>
</apply>
</apply>
<apply>
<times/>
<ci>l_B</ci>
<apply>
<cos/>
<ci>theta</ci>
</apply>
<apply>
<power/>
<ci>omega</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_A_1</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<ci>F_A</ci>
<ci>u_A_1</ci>
</apply>
<ci>m_A</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_B_1</ci>
</apply>
<apply>
<divide/>
<ci>u_A_1</ci>
<ci>m_B</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_B_2</ci>
</apply>
<apply>
<minus/>
<apply>
<divide/>
<ci>u_A_2</ci>
<ci>m_B</ci>
</apply>
<ci>g</ci>
</apply>
</apply>
</math>
</component>
</model>